#pragma once
#include <assert.h>

char* my_strncpy(char* dest,const char* src,size_t count)
{
	assert(dest && src);
	char* base = dest;
	while (count && (*dest++ = *src++) != '\0')
		count--;
	dest--;
	while(count--)
		*dest++ = '\0';
	return base;
}